from django.template import Library

from web import models

register = Library()


@register.filter
def color(num):
    mapping = models.TransactionHistory.charge_type_class_mapping
    return mapping[num]
